home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / PREPARE.HDR < prev    next >
Text File  |  1994-04-25  |  4KB  |  138 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _Prepare(lUseErrHandler) --> NIL
  8.  
  9. PARAMETERS:
  10.  
  11. lUseErrHandler : TRUE or FALSE to use or not use the custom error handler.
  12.  
  13. SHORT:
  14.  
  15. Sets various run time envrionments, options, and a custom error handler.
  16.  
  17. DESCRIPTION:
  18.  
  19. _Prepare() issues several statement and function calls that are common to all
  20. programs (generally) that use this library as a development platform.  It
  21. sets statuses that are commonly used by the other functions in this library
  22. such as _Menu(), _Kmenu() and _FScreen().
  23.  
  24. An additional feature of this program is that any program using can be
  25. disabled by creating a file in the program directory called @DISABLE.DAT and
  26. then calling this function at the beginning of every program.
  27.  
  28. If the @DISABLE.!!! file exists, the program is terminated with a message
  29. explaining why.  It is handy to control access in a network environment when
  30. users must be prevented from access so that updates can be made.
  31. Additionally, you may include comments in the @DISABLE.!!! file explaining
  32. why the application has been disabled and these comments (ie, the entire
  33. contents of the file) will be displayed on the screen.
  34.  
  35. _Prepare(), if used in any application, also changes the default errorblock
  36. to use the custom error handling block, bErrorBlock.
  37.  
  38. This custom error handler logs run time errors in a file specified in a DOS
  39. environment variable ERRFILE on the path specified by a DOS Environment
  40. variable ERRPATH.
  41.  
  42. Both of these are acceptable DOS environment variable settings:
  43.  
  44. SET ERRPATH=\ERRORS\
  45. SET ERRPATH=\ERRORS
  46.  
  47. This is invalid:
  48.  
  49. SET ERRPATH=\ERRORS\ERRORLOG.TXT
  50.  
  51. The path setting must contain ONLY a path.
  52.  
  53. This is an example of the file name specification:
  54.  
  55. SET ERRFILE=\ERRORLOG.DAT
  56.  
  57.  
  58. These are invalid:
  59.  
  60. SET ERRFILE=\ERRORLOG.TXT
  61. SET ERRFILE=ERRORLOG.TXT\
  62.  
  63. The ERRFILE must contain ONLY a file name.
  64.  
  65. If either are not specified, the default is:
  66.  
  67. ERRPATH : Current directory
  68. ERRFILE : ERRORLOG.TXT
  69.  
  70.  
  71. The use of the custom error handler can be disabled by passing FALSE as a
  72. parameter: _Prepare(.F.)  This will disable runtime error logging and the
  73. Klipper Error Object.
  74.  
  75. bErrorBlock is a custom error handling system that records many important
  76. statistics and settings (including the user screen) in an error log file
  77. specified as a parameter to _Prepare().  If not specified, the default file
  78. name is ERRORLOG.TXT.  The default location of this file is the current
  79. directory.  The location can be changed by setting an OS environment variable
  80. called ERRPATH.
  81.  
  82. APPLICATION NOTE FILES
  83. ----------------------
  84.  
  85. If a file exists in the current directory named APmmddyy.APN, (where mmddyy
  86. is a date), and the date is todays date, the contents of that file are
  87. presented to the user before the application begins.
  88.  
  89. These files may be prepared in advance by inserting the appropriate mmddyy
  90. value in APmmddyy.APN.  When mmddyy comes around on the calendar, this
  91. Application Note File will be presented to all users each time the system
  92. starts and _Prepare() is called.  The note will vanish the next day when the
  93. system date changes.
  94.  
  95.  
  96.  
  97. NOTE:
  98.  
  99. Use of this function REQUIRES the setting of the U_NAME DOS
  100. Environment Parameter.
  101.  
  102. EXAMPLE:
  103.  
  104. _Prepare()
  105.  
  106. Result:
  107.  
  108. SCORE is set OFF
  109. COLOR is set to w+/b,w+/g
  110. CURSOR is set OFF
  111. WRAP is set ON
  112. EXCLUSIVE is set OFF
  113.  
  114. If @DISABLE.!!! is present, the program is terminated and the contents of the
  115. file are displayed on the screen.  The disable file name is hard coded in
  116. _Prepare() and may not be changed (unless, of course, you have purchased a
  117. source code liscence - hint hint).
  118.  
  119. All errors are recorded in a file called ERRORLOG.TXT in the current
  120. directory.
  121.  
  122. Example 2: (Using an OS Environment Variable (ERRPATH=\LOGFILES)
  123.  
  124. _Prepare('ERRORS.LST')
  125.  
  126. Result:
  127.  
  128. SCORE is set OFF
  129. COLOR is set to w+/b,w+/g
  130. CURSOR is set OFF
  131. WRAP is set ON
  132. EXCLUSIVE is set OFF
  133.  
  134. Same as above, but all errors are recorded in a file called ERRORS.LST in the
  135. \LOGFILES directory.
  136.  
  137. ******************************************************************************/
  138.